﻿<%@ Page Language="C#" ValidateRequest="false" MasterPageFile="~/Include/Admin.master"
    AutoEventWireup="true" CodeFile="Manage.aspx.cs" Inherits="Admin_HelpNava_Manage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="../../Style/Common/DatePage.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table class="editTable" align="center" width="100%" cellpadding="0" cellspacing="1">
        <tr style="background-image: url('/images/管理员页面/title_bg1.jpg'); background-repeat: repeat-x;">
            <td colspan="8" style="font-weight: bold; font-size: large; font-family: 仿宋;">
                <strong class="style1">帮助中心管理中心</strong>
            </td>
        </tr>
    </table>
    <table class="editTable" cellspacing="1">
        <tr>
            <th>
                分类导航
            </th>
            <td>
                <asp:DropDownList ID="drpHelpNava" runat="server">
                </asp:DropDownList>
            </td>
            <th>
                关键字
            </th>
            <td>
                <asp:TextBox ID="txtKey" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:Button ID="btnSearch" runat="server" Text="搜索" onclick="btnSearch_Click" />
            </td>
        </tr>
    </table>
    <h4>
        <a href="Add.aspx">添加帮助文档</a>
    </h4>
    <table style="width: 100%; margin-bottom: 0px;" class="editTable">
        <tr>
            <td align="center" colspan="4">
                <asp:ListView ID="lv_HelpDesList" runat="server" DataKeyNames="ID" OnItemDeleting="lv_HelpDesList_ItemDeleting"
                    OnPagePropertiesChanged="lv_HelpDesList_PagePropertiesChanged" 
                    onitemcommand="lv_HelpDesList_ItemCommand">
                    <LayoutTemplate>
                        <table width="100%" class="editTable" cellspacing="1">
                            <th>
                                所属帮助导航
                            </th>
                            <th>
                                标题
                            </th>
                            <th>
                                内容
                            </th>
                            <th>
                                操作
                            </th>
                            <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                        </table>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <tr>
                            <td>
                                <%#PopulateNavaTitleByNavaID(Eval("NavaID"))%>
                            </td>
                            <td>
                                <%#Eval("Title")%>
                            </td>
                            <td>
                                <%#DongDong.Common.Misc.MaxCharacters(DongDong.Common.Misc.ClearHtml(Eval("Des")),20,"..")%>
                            </td>
                            <td>
                                <asp:LinkButton ID="lbtnUp" runat="server" Text="置顶" CommandName="Up" CommandArgument='<%#Eval("ID")%>'></asp:LinkButton>
                                <a href="Add.aspx?HelpID=<%#Eval("ID") %>">查看/修改</a>
                                <asp:LinkButton ID="lbtnDelete" runat="server" Text="删除" OnClientClick="return confirm('您是否确定删除?');"
                                    CommandName="Delete" CommandArgument='<%#Eval("ID")%>'></asp:LinkButton>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:ListView>
                <div style="padding: 4px; text-align: center;">
                    <asp:DataPager ID="Pager" runat="server" PagedControlID="lv_HelpDesList" OnPreRender="Pager_PreRender"
                        PageSize="20">
                        <Fields>
                            <asp:NumericPagerField ButtonCount="10" CurrentPageLabelCssClass="CurrentPage" NumericButtonCssClass="Page" />
                            <asp:NextPreviousPagerField ShowLastPageButton="true" ShowPreviousPageButton="true"
                                ShowFirstPageButton="true" />
                            <asp:TemplatePagerField>
                                <PagerTemplate>
                                    共<%=Pager.TotalRowCount%>条
                                </PagerTemplate>
                            </asp:TemplatePagerField>
                        </Fields>
                    </asp:DataPager>
                </div>
            </td>
        </tr>
    </table>
</asp:Content>
